package com.pattern.once.builder;

import java.util.ArrayList;
import java.util.List;

/***
 * 导演类
 */
public class Director {

    private List<String> list = new ArrayList<>();

    private CarBuilder hanmaCarBuilder = new HanmaCarBuilder();

    private CarBuilder benchiCarBuilder = new BenchiCarBuilder();


    public CarBuilder getHanmaCarBuilder() {
        list.clear();
        list.add("start");
        list.add("shache");
        list.add("mingdi");
        list.add("stop");
        hanmaCarBuilder.setSequence(list);

        return hanmaCarBuilder;
    }



    public CarBuilder getBenchiCarBuilder() {
        list.clear();
        list.add("start");
        list.add("mingdi");
        list.add("shache");
        list.add("stop");
        benchiCarBuilder.setSequence(list);
        return benchiCarBuilder;
    }


}
